/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test;

import java.io.FileNotFoundException;
import java.io.IOException;
import lucava.importer.uspeed.FileImporter;
import lucava.metamodel.uspeed.UspeedDocument;
import lucava.metamodel.uspeed.visitor.XmlVisitor;

/**
 *
 * @author glenn
 */
public class UspeedParsingTester {

    public static void main(String[] args) throws FileNotFoundException, IOException {
        UspeedParsingTester.assocImporter();
        UspeedParsingTester.definitionImporter();
    }

    public static void assocImporter() throws FileNotFoundException, IOException {
        FileImporter parser = new FileImporter();
        UspeedDocument document = parser.load("data/test/assoc.uspeed");
        XmlVisitor visitor = new XmlVisitor();
        document.accept(visitor);
        visitor.export("data/test/assoc.xml");
    }

    public static void definitionImporter() throws FileNotFoundException, IOException {
        FileImporter parser = new FileImporter();
        UspeedDocument document = parser.load("data/test/def.uspeed");
        XmlVisitor visitor = new XmlVisitor();
        document.accept(visitor);
        visitor.export("data/test/def.xml");
    }
}
